<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="bootstrap.css">
    <link rel="stylesheet" href="bootstrap-theme.min.css">
    <link rel="stylesheet" href="bootstrap-fileinput-master-update/css/fileinput.css">
    <link rel="stylesheet" href="bootstrap-fileinput-master-update/themes/explorer/theme.css">



    <title>Document</title>
</head>
<body>
<div class="container kv-main">
    <form enctype="multipart/form-data">
        <input id="kv-explorer" type="file" name="areaFile" multiple>
        <br>
    </form>
</div>


<script type="text/javascript" src="jquery-2.0.3.js"></script>
<!--<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>-->

<script type="text/javascript" src="bootstrap-fileinput-master-update/js/plugins/sortable.js"></script>
<script type="text/javascript" src="bootstrap-fileinput-master-update/js/fileinput.js"></script>
<script type="text/javascript" src="bootstrap-fileinput-master-update/js/locales/zh.js"></script>
<!--<script type="text/javascript" src="bootstrap-fileinput-master-update/js/locales/zh.js"></script>-->
<script type="text/javascript" src="bootstrap-fileinput-master-update/themes/explorer/theme.js"></script>
<script src="bootstrap.js"></script>

<script type="text/javascript">
//    $(function () {
//        $("#uploadVoucher").fileinput({
//            'theme': 'explorer',
//            'uploadUrl': 'http://192.168.0.144/erp/DUser/importXls',
//            overwriteInitial: false,
//
//            success:function(responseData){
//                var dataList = responseData.dataList;
//
//            },
//            error: function(err) {
//                console.info(err);
//            }
//
//
//        });
//
//        $("#uploadVoucher").on("fileuploaded", function (event, data, previewId, index) {
//            console.log(data.response);
//
//            if(uploadedImgList == ''){
//                uploadedImgList = data.response.dataList;
//            }else{
//                uploadedImgList += ',' + data.response.dataList;
//            }
//
//            console.log('上传图片地址：' + uploadedImgList);
//
//
//
//        });
//    })
    $(document).ready(function () {
        $("#kv-explorer").fileinput({
            uploadUrl: "http://192.168.0.144/erp/DUser/importXls",
            uploadAsync: true,
            previewFileIcon: '<i class="fa fa-file"></i>',
            allowedPreviewTypes: null, // set to empty, null or false to disable preview for all types
            previewFileIconSettings: {
                'docx': '<i class="fa fa-file-word-o text-primary"></i>',
                'xlsx': '<i class="fa fa-file-excel-o text-success"></i>',
                'pptx': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
                'jpg': '<i class="fa fa-file-photo-o text-warning"></i>',
                'pdf': '<i class="fa fa-file-pdf-o text-danger"></i>',
                'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
            }
        });
        $("#kv-explorer").on("fileuploaded", function (event, data, previewId, index) {
            console.log('上传图片地址：', data.response.dataList);
        });

//        $("#kv-explorer").fileinput({
//            'theme': 'fa',
//            'uploadUrl': 'http://192.168.0.144/erp/DUser/importXls',
//            overwriteInitial: true
//        });
//
//        $("#kv-explorer").on("fileuploaded", function (event, data, previewId, index) {
//            console.log('上传图片地址：', data.response.dataList);
//        });
    });

</script>
</body>
</html>